package cc.autoapi.pucong.auto.flow.core.qlexpress.enumSelf;

public enum QlDataTypeEnum {
    字符串("string", "字符串"),
    数字("number", "数字"),
    布尔("boolean", "布尔"),
    时间("time", "时间"),
    list("list", "list"),
    map("map", "map"),

    ;

    private String code;
    private String desc;

    private QlDataTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static QlDataTypeEnum getEnumByCode(String code) {
        for (QlDataTypeEnum e : QlDataTypeEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }
}
